<?php

$rainbow =  array('violet',
                  'indigo',
                  'blue',
                  'green',
                  'yellow',
                  'orange',
                  'red');

$arr = array_slice($rainbow, -5, -4);

print_r($arr);
